﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Automobile.service.Model;
using Automobile.service.BLL;

namespace Automobile.service.UI
{
    public partial class AddWareHose : System.Web.UI.Page
    {
        WareHoseBll bll = new WareHoseBll();

        private void LoadData()
        {
            
        }

        protected void Button6_Click(object sender, EventArgs e)
        {
            WareHoseModel w = new WareHoseModel();
            w.WareHose_Name = this.TextBox1.Text;
            w.WareHose_People = this.TextBox2.Text;
            w.WareHose_Phone = this.TextBox3.Text;
            w.WareHose_Address = this.TextBox4.Text;
            w.WareHose_Remark = this.TextBox5.Text;
            if (bll.AddWareHose(w) > 0)
            {
                Response.Write("<script>alert('添加成功!');location.href='WareHose.aspx';</script>");
            }
            else {
                Response.Write("<script>alert('添加失败!');</script>");
            }
        }

        protected void butBack(object sender, EventArgs e)
        {
          Response.Redirect("WareHose.aspx");
        }
    }
}